
class Admin::BaseController < ApplicationController

  layout 'admin/layouts/admin'

  before_action :require_logined
  before_action :admin_filter

  protected

  def get_first_img pending_params
    doc = Nokogiri::HTML(pending_params[:content], nil, "UTF-8")
    img = doc.at('img')
    if img.present?
      img['src']
    else
      nil
    end
  end

end

